package com.charactereducation.api.service.activity;

import com.charactereducation.module.vo.Activity;
import com.charactereducation.tools.myRunTime.MyRunTimeExcption;
import com.github.pagehelper.PageInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * Created by Baggio on 2018-6-25.
 */
@FeignClient(name = "service-activityCenter",fallbackFactory = ActivityServiceClientBack.class)
public interface ActivityServiceClient {

    @GetMapping(value = "/activity/{id}")
    Activity getUserById(@PathVariable("id") Long id) throws MyRunTimeExcption;


    @GetMapping(value = "/activity/pageInfo")
    PageInfo pageInfo(@RequestParam Map<String, String> map) throws MyRunTimeExcption;

    @PostMapping(value = "/activity/modify")
    void modify(@RequestBody Activity activity) throws MyRunTimeExcption;
}
